import request from '@/utils/request'
let baseUrl =
  process.env.NODE_ENV === 'production' ? '/api/riskGateway' : 'riskGateway'
// 数据源接口使用情况
export const getList = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/datasource-statistics/interface-usage-list',
    method: 'post',
    data
  })
// 数据源名称map接口
export const getNameMap = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/interface-config/datasource-names',
    method: 'post',
    data
  })
// 数据源使用情况下载
export const listDownload = (data?: any) =>
  request({
    baseURL: baseUrl,
    url: '/datasource-statistics/interface-list-download',
    method: 'post',
    responseType: 'blob',
    data
  })
export const downloadUrl =
  baseUrl + '/datasource-statistics/interface-list-download-get'
